/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package CapadeDatos;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import javax.swing.JOptionPane;
import modelo.beanAutores;

/**
 *
 * @author principal
 */
public class DaoAutoresporSistema {

public void insertarautores(int Sistema, int Estado){
        Boolean verdad = false;
    try{
            Connection cn = ConexionBD.getInstance().getConnection();
            Statement stm = cn.createStatement();
            String sql ="Call procsistemaxusuario('"
                    + Sistema + "', '"
                    + Estado + "');";
            if(stm.executeQuery(sql).wasNull()){
               verdad = false;
               JOptionPane.showMessageDialog(null,"NO INGRESADO");
            }
            else {
                verdad = true;
                JOptionPane.showMessageDialog(null,"INGRESADO");
            }
    }catch(Exception e){System.out.print(e);
   }
   }

}
